include ../Makefile.param
CXX:=$(CROSS)g++
STRIP=$(CROSS)strip
CFLAGS += -g -Wall -O2

INC_PATH += -I./
LIBPATH += -L./

SRCXX += main.cpp
SRCXX += gui_init.cpp

LIBS += -Wl,--start-group

LIBS += $(MPI_LIBS) $(AUDIO_LIBA) $(REL_LIB)/libsecurec.a $(REL_LIB)/libss_hdmi.a

LIBS += -Wl,--end-group

LIBS+= -Wl,-gc-sections

target = gui_init_test

all: $(target)

PROGXX_OBJ= $(SRCXX:.cpp=.o)
PROG_OBJ= $(SRC:.c=.o)

$(target):$(PROGXX_OBJ) $(PROG_OBJ) $(DEVICE_OBJ)
	$(CXX) $^ -o $@ $(INC_PATH) $(LIBPATH) $(LIBS) $(CFLAGS) -lpthread
	$(STRIP) $(target)

%.o:%.cpp
	$(CXX) -c -o  $@ $< $(INC_PATH) $(CFLAGS)

%.o:%.c
	$(CC) -c -o  $@ $< $(INC_PATH) $(CFLAGS)

device_clean:
	-rm $(DEVICE_OBJ)

clean:
	-rm $(target) $(PROG_OBJ) $(PROGXX_OBJ) $(DEVICE_OBJ)

install:
	cp $(target) /home/mjj/work/nfs/ss928/

